package com.example.flutterxc
import androidx.annotation.NonNull;
import io.flutter.embedding.android.FlutterActivity
import io.flutter.embedding.engine.FlutterEngine
import io.flutter.plugins.GeneratedPluginRegistrant
import org.devio.flutter.plugin.asr.AsrPlugin
import io.flutter.embedding.engine.plugins.shim.ShimPluginRegistry
//import org.devio.flutter.splashscreen.SplashScreen;

import android.os.Build
import android.view.ViewTreeObserver
import android.view.WindowManager
class MainActivity: FlutterActivity() {
    override fun configureFlutterEngine(@NonNull flutterEngine: FlutterEngine) {
//        SplashScreen.show(this,true);
        GeneratedPluginRegistrant.registerWith(flutterEngine);

        registerSelfPlugin(flutterEngine);
    }


    private fun registerSelfPlugin(flutterEngine:FlutterEngine) {
        val shimPluginRegistry = ShimPluginRegistry(flutterEngine)
        AsrPlugin.registerWith(shimPluginRegistry.registrarFor("org.devio.flutter.plugin.asr.AsrPlugin"))
    }

}